﻿@{
    Layout = null;
}
@using WH.NurseSys.Model;
<!DOCTYPE html>

<html>
<head>
    <title>移动护理系统</title>
    <style type="text/css">
        *{padding:0;margin:0;font-family:微软雅黑;}
        .nav_back{height:64px;background-color:#19A97B;color:#fff;font-size:16px;}
        .nav{width:1200px;height:64px;margin:0 auto;}
        .nav li{float:left;list-style-type:none;width:160px;text-align:center;line-height:64px;}
        .nav li a{text-decoration:none;color:White;display:block;}
        .nav li a:hover{background-color:#12976D;color:White;}
        #menuAccount{z-index:1;position:absolute;border-left:1px solid #19A97B;border-bottom:1px solid #19A97B;border-right:1px solid #19A97B;display:none;background-color:White;}
        #menuAccount li{float:none;list-style-type:none;}
        #menuAccount li a{text-decoration:none;display:block;color:Black;}        
        .container{clear:both;width:1200px;margin:20px auto;}
        input[type="text"]{height:38px;width:150px;}
        input[type="submit"]{height:40px;width:120px;}
        table{width:100%;border-collapse:collapse;margin-top:20px;}
        th{background-color:#F9FBFE;font-weight:normal;color:#333;border:1px solid #C0CDD9;height:38px;padding:3px 10px;text-align:left;}
        td{border:1px solid #C0CDD9;height:38px;color:#333;padding:3px 10px;}
    </style>
    <script type="text/javascript">
        function showMyInfo() {
            var menuUl = document.getElementById("menuAccount").style.display = "block";
        }
        function hideMyInfo() {
            document.getElementById("menuAccount").style.display = "none";
        }
        function deleteDept(id, name) {           
            if (window.confirm("你是否确认要删除科室\"" + name + "\"，一旦删除将不可恢复")==true) {
                window.location="/admin/dept/delete/"+id;
            }
        }   
    </script>
</head>
<body>
    <div class="nav_back">
        <div class="nav">
            <ul>
                <li><a href="/admin/doctor/list">用户</a></li>            
                <li><a href="/admin/dept/list">科室</a></li>
                <li><a href="/admin/patient/list">病人</a></li>
                <li onmouseover="showMyInfo()" onmouseout="hideMyInfo()">
                    <a href="#">我的帐号</a>
                    <ul id="menuAccount">
                        <li><a href="javascript:void()">帐号信息</a></li>
                        <li><a href="/admin/doctor/logout">退出</a></li>
                    </ul>
                </li>
            </ul>
        </div>        
    </div>
    <div class="container">
        <form action="/admin/dept/insert" method="post">
            科室名称:
            <input type="text" name="name" />
            <input type="submit" value="新建科室" />
        </form>        
        <table>
        <tr>
            <th>科室</th>
            <th>修改</th>
            <th>删除</th>
        </tr>
        @{
            foreach(Dept dept in @Model as List<Dept>)
            {
        <tr>
            <td>@dept.Name</td>
            <td><a href="/admin/dept/update/@dept.Id">修改</a></td>
            <td><a href="javascript:void(0)" onclick="deleteDept('@dept.Id','@dept.Name')">删除</a></td>            
        </tr>
            }
        }
    </table>
    </div>
    
</body>
</html>
